import iostack

f = iostack.open("test1.dat", "w")
f.write("hello ")
f.write("brave new ")
print f.position
f.flush()
print f.position
f.write("world")
print f.position
f.close()

f = iostack.open("test1.dat", "r")
print f
print f.readall()


